export function $(selector) {
    return document.querySelector(selector);
}
export function addClass(el, className) {
    let _class = el.getAttribute("class");
    let temp = _class.split(" ").concat([className]).join(" ");
    el.setAttribute("class", temp);
    return el;
}
export function removeClass(el, className) {
    let _class = el.getAttribute("class");
    let classArr = _class.split(" ");
    if (classArr.length) {
        let index = classArr.indexOf(className);
        classArr.splice(index, 1);
    }
    el.setAttribute("class", classArr.join(" "));
    return el;
}